<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        /*z-index设置给了absolute定位元素的堆叠顺序   */
    .parent{
        width: 300px;height: 300px;
        background: salmon;
    }
    .one{
        width:100px;
        height: 100px;
        background: skyblue;
        position:absolute;
        z-index: 100;
    }
    .two{
        width: 200px;
        height: 50px;
        background: burlywood;
        position:absolute;
        z-index: 101;
    }
   .parent:hover .one{
       z-index: 200;
   }
    </style>
</head>
<body>
    <!-- z-index -->
    <div class="parent">
        <div class="one"></div>
        <div class="two"></div>
    </div>
</body>
</html>